﻿@model Masapan_shop.Models.Producto

@{
    ViewBag.Title = "Create";
}

<h2>Crear</h2>




<h3>Producto</h3>
<form method="post" action="/Administracion/Create">
    <div class="editor-label">
        @Html.LabelFor(model => model.nombre)
    </div>

    <div class="editor-field">
        @Html.EditorFor(model => model.nombre)

    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.modelo)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.modelo)

    </div>

    <div>Marca</div>

    <select id="marca_id" name="marca_id">
        @using (var db = new Masapan_shop.Models.MasapanContext())
        {
            foreach (var mar in db.marcas)
            {
            <option value="@mar.id">@mar.nombre</option>}
        }
    </select>

    <div class="editor-label">
        @Html.LabelFor(model => model.precio)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.precio)

    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.descripcion)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.descripcion)

    </div>



    <div class="editor-label">
        @Html.LabelFor(model => model.foto)
    </div>
    <div class="editor-field">
        <input type="file" name="file" title="foto" />
    </div>
    <input type="submit" value="Agregar" />
</form>

<div>
    @Html.ActionLink("Volver a la lista", "Index")
</div>

